package com.starwalking.starwalkingaiagent.demo.client;

import org.springframework.ai.chat.client.ChatClient;// 方式1：使用构造器注入
import org.springframework.stereotype.Service;

@Service
public class ChatService {
    private final ChatClient chatClient;

    public ChatService(ChatClient.Builder builder) {
        this.chatClient = builder
                .defaultSystem("你是恋爱顾问")
                .build();
    }
}
//
//// 方式2：使用建造者模式
//ChatClient chatClient = ChatClient.builder(chatModel)
//        .defaultSystem("你是恋爱顾问")
//        .build();
